home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Snippets / Development Tools & Languages / MacApp C++ Load⁄dump / DemoTextDump 2 / MDemoText.cp < prev    next >
Encoding:
Text File  |  1992-07-15  |  1.6 KB  |  58 lines  |  [TEXT/MPS ]

  1. /*******************************************************************************
  2. *
  3. * File:   MDemoText.cp
  4. *
  5. * Description: Main Program
  6. *
  7. *
  8. * Copyright © 1985 - 1990 by Apple Computer, Inc. All rights reserved.
  9. ********************************************************************************/
  10.  
  11. #ifndef __DemoTextDump__
  12. #include "DemoTextDump.h"
  13. #endif
  14.  
  15. #ifndef qDumpOwn
  16. #include "UDemoText.h"
  17. #endif QDumpOwn
  18.  
  19.  
  20. //  {$MC68020-}                                                // The main program must be universal code
  21. //  {$MC68881-}
  22.  
  23.  
  24. #pragma segment Main
  25.  
  26. void main()
  27.     {
  28.     TDemoTextApplication *gDemoTextApplication;
  29.  
  30.     InitToolBox();                                             // Essential toolbox and utilities
  31.                                                             // initialization
  32.     if (ValidateConfiguration(&gConfiguration))                // Make sure we can run
  33.         {
  34.  
  35.         // Continue with remainder of initialization
  36.         InitUMacApp(8);                                     // Initialize MacApp; 8 calls to MoreMasters
  37.  
  38.         // ------------------------------------------------------
  39.         // If you are going to use streams for debugging IO then:
  40.         // #include <stdio.h>
  41.         // #include <iostream.h>
  42.         // and execute the following line since MacApp's debug output is essentialy "printf"s
  43.  
  44.         // cout.sync_with_stdio();
  45.  
  46.         InitUPrinting();                                    // Initialize the Printing unit
  47.         InitUTEView();                                        // Initialize the TEView unit
  48.         
  49.         gDemoTextApplication = new TDemoTextApplication;    // Create an application object
  50.         FailNIL(gDemoTextApplication);
  51.         gDemoTextApplication->IDemoTextApplication();        // Initialize the application
  52.         gDemoTextApplication->Run();                        // Run the application
  53.         }
  54.     else
  55.         {
  56.         StdAlert(phUnsupportedConfiguration);
  57.         }
  58.     }